package firstStage.part7;

/**
 * @ClassName: [StudentDemo]
 * @Description: 学生测试类
 * @Author: [黄劲松]
 * @CreateDate: [2021-02-06]
 * @Version: [v1.0]
 */
public class StudentDemo {
    public static void main(String[] args) {

        //创建对象
        Student s = new Student();
        //使用对象
        System.out.println(s.name + "," + s.age);

        s.name = "周翡";
        s.age = 16;
        System.out.println(s.name + "," + s.age);
        //调用方法
        s.study();
        s.doHomeWork();

        //创建对象
        Student s2 = new Student();
        //使用对象
        System.out.println(s2.name + "," + s2.age);
        s2.name = "张敏";
        s2.age = 18;
        System.out.println(s2.name + "," + s2.age);
        //调用方法
        s2.study();
        s2.doHomeWork();

        //创建对象
        Student s3 = s2;
        //使用对象
        s3.name = "赵敏";
        s3.age = 20;
        System.out.println(s2.name + "," + s2.age);
        System.out.println(s3.name + "," + s3.age);
    }
}
